<?php

declare(strict_types=1);

namespace App\Admin\Annotation;


use App\Admin\Annotation\Parser\AnnotationAuthParser;
use Attribute;
use Newbie\Annotation\AbstractAnnotationAttribute;

/**
 * 用户登录验证。
 * @Annotation
 * @Target({"CLASS","METHOD"})
 */
#[Attribute(Attribute::TARGET_CLASS | Attribute::TARGET_METHOD)]
class Auth extends AbstractAnnotationAttribute {
    /**
     * 无需参数
     */
    public function __construct () {
        // 解析参数
        $this->setArguments(func_get_args());
    }

    public static function getParser (): string|array {
        return [AnnotationAuthParser::class];
    }
}